<html>
<head>
  <meta charset="utf-8">
  <title>创建元素</title>
   <script>
        window.onload=function(){
		    var aA=document.getElementsByTagName("a");
			var oUl=document.getElementById("ul1");
			for(var i=0;i<aA.length;i++){
			  aA[i].onclick=function(){
			     // 删除元素
			     oUl.removeChild(this.parentNode);
			  
			  };		
			}		
		};
   </script>
</head>
<body>
  <ul id="ul1">
    <li>asdsada111111sd<a href="javascript:;">删除</a></li>
    <li>asdsadasd<a href="javascript:;">删除</a></li>
    <li>asdsadasd<a href="javascript:;">删除</a></li>
  
  </ul>


</body>
</html>